package name.sraynal.msgdispatcher.view;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.TextBox;

import name.sraynal.msgdispatcher.controller.Controller;
import name.sraynal.msgdispatcher.event.Event;

public class TextView extends View {
	
	static final Command exitCommand = new Command("Exit", Command.STOP, 0);
	
	public TextView(Controller[] controllers) {
		super(controllers);
		this.displayable = new TextBox("message", "Salut !", 150, 0);
		this.displayable.addCommand(new Command("OK", Command.OK, 0));
		this.displayable.setCommandListener(new CommandListener() {

			public void commandAction(Command command, Displayable arg1) {
				sendEvent(new Event(Event.TEXT_WRITTEN));
			}});
	}
	
	public String getText() {
		return null;
	}
	
}
